package com.qy.dubbo.server.service;

import org.springframework.stereotype.Component;

import com.alibaba.dubbo.config.annotation.Service;
import com.qy.dubbo.server.api.DubboUserServer;

@Service(interfaceClass=DubboUserServer.class)
@Component
public class DubboUserServerImpl implements DubboUserServer {

	@Override
	public String getUser(Long id) throws InterruptedException {
		String name = "";
		if(1==id){
			name = "董志峰";
		}else if(2==id){
			name = "刘亦菲";
		}else{
			name = "杨幂";
		}
		String result =name+"8081";
		System.out.println("调用了一次");
		Thread.sleep(2000);
		return result;
	}

}
